package com.parenting.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.parenting.entities.CouponDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.parenting.request.ActivityCouponConsumptionListRequest;
import com.parenting.request.CouponDropDownRequest;
import com.parenting.response.ActivityCouponListResponse;
import com.parenting.response.CouponDropDown;
import com.parenting.response.CouponListResponse;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 优惠券 Mapper 接口
 * </p>
 *
 * @author 烟台业达-王世玺
 * @since 2021-08-27s
 */
public interface CouponMapper extends BaseMapper<CouponDO> {

    /***
     * 分页查询
     * @param page 分页对象
     * @param shopId 店铺ID
     * @return
     */
    IPage<CouponListResponse> getPageListCoupon( @Param("page") IPage<CouponListResponse> page,@Param("shopId") String shopId);

    /***
     *
     * @param page 分页对象
     * @param request 活动优惠券使用情况查询条件对象
     * @return
     */
    IPage<ActivityCouponListResponse>  getActivityCouponConsumptionList(@Param("page") IPage<ActivityCouponListResponse> page,@Param("shopId") String shopId,@Param("request") ActivityCouponConsumptionListRequest request);



    /***
     *
     * @param request
     * @return
     */
    List<CouponDropDown> getCouponDropDown (@Param("request") CouponDropDownRequest request);
}
